<!--
 * @Author: 码上talk|RC
 * @Date: 2021-08-14 10:52:09
 * @LastEditTime: 2021-09-16 16:23:36
 * @LastEditors: 码上talk|RC
 * @Description: 
 * @FilePath: /ma-portal/components/invite-code-wx-entry/index.vue
 * @微信:  13680065830
 * @邮箱:  3189482282@qq.com
 * @oops: Just do what I think it is right
-->
<template>
  <image :src="inviteCodeWxEntryFinal" class="invite-code-image" />
</template>

<script>
import { model } from '@/model';
const { Request } = model;
export default {
  props: ['memberId', 'url', 'invite-code-image'],
  data () {
    return {
      request: new Request(),
      inviteCodeWxEntryFinal: this.url
    }
  },
  created () {
    !this.url && this.request.do('open', 'member', 'inviteCodeWxEntry', { params: { memberId: this.memberId }, data: {} }).then(res => {
      const { status, data } = res;
      if (status) {
        this.inviteCodeWxEntryFinal = data;
      } else {
        this.toast('获取会员邀请码失败');
      }
    });
  }
}
</script>

<style scoped>
.invite-code-image {
  width: 440rpx;
  height: 440rpx;
}
</style>